/*
 * @Description: 
 * @Author: zoe
 * @Date: 2024-09-25 17:15:38
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-25 17:21:07
 */
public class Test_Enum {
    public static void main(String[] args) {
        // 实例化枚举对象
        Gender gender1 = Gender.MALE;
        //枚举对象的取值只能是枚举元素
        Gender gender2 = Gender.FEMALE;
        System.out.println(gender1);
        //默认输出枚举元素名称字符串
        System.out.println(gender2);
        gender1.setDesc("性别");
        System.out.println(gender1.getDesc());
    }
}
